<!doctype html>
<html lang="zh-CN">
<include file="Public:head" />

<body class="user-select">
<section class="container-fluid">
  <include file="Public:header" />
  <div class="row">
    <include file="Public:aside" />
    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-lg-10 col-md-offset-2 main" id="main">
      <div class="row">
        <div class="col-md-5">
          <h1 class="page-header">积分转让</h1>
          <form action="__MODULE__/User/jfzr" method="post" autocomplete="off">
            <div class="form-group">
              <label for="user_id">用户ID</label>
              <input type="text" id="zr_user_id" name="zr_user_id" class="form-control" placeholder="在此处输入被转让用户ID" required autocomplete="off">
              <input type="hidden" name="user_id" value="{$Think.session.user.id}">
              <span class="prompt-text">而且只能转让给直属的团队</span> </div>
            <div class="form-group">
              <label for="category-alias">转让财富积分</label>
              <input type="text" id="zr_cfjf_num" name="zr_cfjf_num" class="form-control" placeholder="在此处输入转让财富积分" required autocomplete="off">
              <span class="prompt-text">只需输入转让的财富积分数量即可</span> </div>
            
                      <div class="form-group">
              <label for="category-describe">留言</label>
              <textarea class="form-control" id="zr_desc" name="zr_desc" rows="4" autocomplete="off"></textarea>
              <span class="prompt-text">恭喜发财，大吉大利</span> </div>
              <eq name="jfzr_opne" value="1"><button class="btn btn-primary" type="submit" name="submit">积分转让</button><else/>
                <button class="btn btn-primary" type="submit" name="submit" disabled>积分转让未开启</button>
              </eq>
            
          </form>
        </div>

        <div class="col-md-7">
          <h1 class="page-header">直属团队 <span class="badge">{$teamNum}</span></h1>
          <div class="table-responsive">
            <table class="table table-striped table-hover">
              <thead>
                <tr>
                  <th><span class="glyphicon glyphicon-paperclip"></span> <span class="visible-lg">ID</span></th>
                  <th><span class="glyphicon glyphicon-file"></span> <span class="visible-lg">姓名</span></th>
                  <th><span class="glyphicon glyphicon-list-alt"></span> <span class="visible-lg">等级</span></th>
                 <!--  <th><span class="glyphicon glyphicon-pushpin"></span> <span class="visible-lg">消费订单数</span></th>
                 <th><span class="glyphicon glyphicon-pencil"></span> <span class="visible-lg">操作</span></th> -->
                </tr>
              </thead>
              <tbody>
              <volist name="invite_users" id="vo">
                <tr>
                  <td>{$vo.id}</td>
                  <td>{$vo.truename}</td>
                  <td>{$vo.status}</td>
                  <!-- <td>{$vo.id}</td>
                  <td><a href="update-category.html">修改</a> <a rel="1">删除</a></td> -->
                </tr>
               </volist>
                
              </tbody>
            </table>
            <span class="prompt-text"><strong>注：</strong>目前只列出部分转让记录,更多请到“团队”菜单查看</span> </div>
        </div>


        <div class="col-md-7">
          <h1 class="page-header">转让记录 <span class="badge">{$teamNum}</span></h1>
          <div class="table-responsive">
            <table class="table table-striped table-hover">
              <thead>
                <tr>
                  <th><span class="glyphicon glyphicon-paperclip"></span> <span class="visible-lg">转让给的用户ID</span></th>
                  <th><span class="glyphicon glyphicon-file"></span> <span class="visible-lg">财富积分</span></th>
                  <th><span class="glyphicon glyphicon-list-alt"></span> <span class="visible-lg">转让时间</span></th>
                 <th><span class="glyphicon glyphicon-pushpin"></span> <span class="visible-lg">转让留言</span></th>
                 <!--<th><span class="glyphicon glyphicon-pencil"></span> <span class="visible-lg">操作</span></th> -->
                </tr>
              </thead>
              <tbody>
              <volist name="records" id="vo">
                <tr>
                  <td>{$vo.zr_userid}</td>
                  <td>{$vo.jifen_num}</td>
                  <td>{$vo.addtime|date="y-m-d H:i:s",###}</td>
                  <td>{$vo.zr_desc}</td>
                 <!--  <td><a href="update-category.html">修改</a> <a rel="1">删除</a></td> -->
                </tr>
               </volist>
                
              </tbody>
            </table>
            </div>
        </div>
      </div>
    </div>
  </div>
</section>
<include file="Public:modal" />
<script>
//是否确认删除
$(function(){   
  $("#main table tbody tr td a").click(function(){
    var name = $(this);
    var id = name.attr("rel"); //对应id  
    if (event.srcElement.outerText === "删除") 
    {
      if(window.confirm("此操作不可逆，是否确认？"))
      {
        $.ajax({
          type: "POST",
          url: "/Category/delete",
          data: "id=" + id,
          cache: false, //不缓存此页面   
          success: function (data) {
            window.location.reload();
          }
        });
      };
    };
  });   
});
</script>
</body>
</html>
